﻿using System;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            yuan();
            siweishu();
            bidaxiao();
        }
        static void yuan()
        {
            Console.WriteLine("请输入半径");
            string r = Console.ReadLine();
            Double R = Convert.ToDouble(r);

            double mj = (R * R) * 3.14;
            Console.WriteLine("圆面积为" + mj);
        }
        static void siweishu()
        {
            Console.WriteLine("请输入一个四位数");
            string a = Console.ReadLine();
            int b = Convert.ToInt32(a);
            int qian = b / 1000;
            int bai = b % 1000 / 100;
            int shi = b / 10 % 10;
            int ge = b % 100%10;

            Console.WriteLine("千位="+qian+", 百位="+bai+", 十位="+shi+", 个位="+ge);
        }
        static void bidaxiao()
        {
            Console.WriteLine("请输入第1个数字");
            double a = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("请输入第2个数字");
            double b = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("请输入第3个数字");
            double c = Convert.ToDouble(Console.ReadLine());
            double x;
            double y;
            if (a > b)
            {
                x = a;
            }
            else 
            {
                x = b;
            }
            if (x > c)
            {
                y = x;
            }
            else
            {
                y = c;
            }

            Console.WriteLine("三个数中最大值为" + y);
        }
    }
}
